﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CNVP.Framework.Utils;
using CNVP.JShop.Web.WebReference;
using CNVP.JShop.UI;
using CNVP.Config;
namespace CNVP.JShop.Web.Admin
{
    public partial class License : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                IndexWS webServer = new IndexWS();
                string _SiteSerial = TxtLicense.Text.Trim().ToString();
                Empower model = webServer.GetEmpowerObj(_SiteSerial);
                Config.BaseConfig.SaveXmlConfig("License", _SiteSerial);
                ActivationCode.SaveActivationCode(model.ActivationCode);
                MessageUtils.ShowRedirect("授权下载完成。", "Login.aspx");
            }
            catch
            {
                MessageUtils.ShowRedirect("授权下载失败，请致电客服专员为您解决该问题！", "License.aspx");
            }
        }
    }
}